<!-- LEFT -->
 <?php
 if(!$this->inbox){
    $this->inbox = array();
 }
 echo $this->loadTemplate('left','default');

 ?>
 <!-- END LEFT -->
 <script src="../media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="../media/system/js/core.js" type="text/javascript"></script>

 <form action="index.php?<?php echo $_SERVER['QUERY_STRING'] ?>" method="post" name="adminForm" id="adminForm">
     <div id="jm-content">
     <h3 class="jm-title"><?php echo $this->title?></h3>
        <!-- SEARCH MESS -->
        <?php echo $this->loadTemplate('toolbar','default'); ?>
            <div style="width: 100%;">
            <br />
                <table id="tb_blue">
                    <thead>
                            <tr>
                                <th width="1%">
                                    <input type="checkbox" name="checkall-toggle" value="" title="Check All" onclick="Joomla.checkAll(this)"/>
                                </th>
                                <th width="15%">ステータス</th>
                                <th width="15%">送信者</th>
                                <th width="">件名</th>
                                <th width="15%">日付</th>
                            </tr>
                        </thead>

                        <tbody>
<?php foreach($this->inbox as $k=>$mes):

    $check = $mes->F_CHKF != 1 ? 'checked' : null;

        if( !empty($mes->F_ATTA_LIST) &&
             $mes->F_ATTA_LIST != "|" &&
             $mes->F_ATTA_LIST != "null" && 
             $mes->F_ATTA_LIST != "[]"){
            $att = "<span class='papper_clip'></span>";
        } else {
            $att = "";
        }

    echo "<tr class='row".($k+1)." $check'>";
        echo "<td><input type='checkbox' id='cb$k' name='cid[]' value='$mes->F_CODE' onclick='Joomla.isChecked(this.checked);'/></td>";

        echo "<td>". $att .$this->model->checkFlag($mes, 'F') . "</td>";

        echo "<td >".$this->model->getUserByUsername($mes->F_USEM_CODE)."</td>";
		// echo "<td >".$mes->F_OCBA_CODE."</td>";
        
        $jsearch = JRequest::getVar('jsearch');
        $idFolder = '&id='.$jsearch['folder'];
        echo "<td><a href='index.php?top=page&option=com_frmessage&task=view&cate=folder&cid[]={$mes->F_CODE}{$idFolder}'>
                $mes->F_TITLE</a>
            </td>";


        echo "<td >".date('Y/m/d', strtotime($mes->F_DATE))."</td>";
    echo "</tr>";

endforeach ?>

                        </tbody>

                        <tfoot>
                            <tr>
                                <td colspan="15">
                                    <?php echo $this->pagination->getListFooter(); ?>
                                </td>
                            </tr>
                        </tfoot>
                </table>
                <div>
                    <input type="hidden" name="boxchecked"/>
                    <input type="hidden" name="task" id="task" value="<?php echo JRequest::getVar('task')?>"/>
                
                </div>
             </div>
         </div>

    </form>
<script>
jQuery().ready(function(){
    jQuery('#toolbar-box').css('display','none');
    jQuery('#down-arrow, #cancel').click(function(){
        jQuery('#content-search').toggle();
        return false;
    })
})
</script>
 <!-- END CONTENT -->

